package com.aizuda.boot.modules.business.contract.entity.vo;

import com.aizuda.boot.modules.common.constant.enums.BranchJoinTypeEnum;
import com.aizuda.boot.modules.common.constant.enums.NodeTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author sangyirong
 * @ClassName WorkflowNodesShowDTO
 * @Version 1.0
 * @Date 2025/5/21 11:45
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "合同流程节点列表")
public class WorkflowNodesShowDTO {

    @Schema(description = "节点ID")
    private Integer id;

    @Schema(description = "所属审批流ID")
    private Integer workflowId;

    @Schema(description = "节点类型")
    private NodeTypeEnum nodeType;

    @Schema(description = "节点名称")
    private String nodeName;

    @Schema(description = "节点描述")
    private String description;

    @Schema(description = "分支ID（UUID），用于标识并行分支")
    private String branchId;

    @Schema(description = "在同一个分支内的顺序，或者主流程中的顺序")
    private Integer orderNum;

    @Schema(description = "是否是分支的起始节点")
    private Boolean isBranchStart;

    @Schema(description = "分支汇聚类型：ALL_COMPLETED-所有分支完成（并行审批），ORDER_COMPLETED-任意分支完成（顺序审批）")
    private BranchJoinTypeEnum branchJoinType;

    @Schema(description = "目标节点列表")
    private List<TargetNodeDTO>  targetNode;

    @Schema(description = "审批人列表")
    private List<WorkflowNodeAssigneeShowDTO> assignee;

    @Schema(description = "抄送人列表")
    private List<WorkflowNodeCcShowDTO> cc;

    @Schema(description = "节点控制列表")
    private List<WorkflowNodeControlShowDTO> controls;

    @Schema(description = "节点字段列表")
    private List<WorkflowNodeFieldShowDTO> fields;
}
